class Solution {
public:
    int findLengthOfLCIS(vector<int>& nums) {
        int left = 0, ret = 0, sz = nums.size();
        while(left < sz)
        {
            int right = left + 1; // 找到递增区间的末端
            while(right < sz && nums[right] > nums[right - 1])
            {
                ++right;
            }
            ret = max(ret, right - left);
            left = right; // 贪心：直接在循环中更新下⼀个位置的起点
        }
        return ret;
    }
};